let words =["Aasdfghjkl","Qwertyuiop","zZxcvbnm"]



var findWords = function(words) {
    let str1 = "qwertyuiop"
    let str2 = "asdfghjkl"
    let str3 = "zxcvbnm"
    let map1 = new Map()
    let map2 = new Map()
    let map3 = new Map()
    let result = true;
    let arr = []
    for(let i=0;i<str1.length;i++){
        map1.set(str1[i],1)
    }
    for(let j=0;j<str2.length;j++){
        map2.set(str2[j],1)
    }
    for(let z=0;z<str3.length;z++){
        map3.set(str3[z],1)
    }

    for(let x=0;x<words.length;x++){
/*         for(let v=0;v<words[x].length;v++){
            
        } */
if(map1.has(words[x][0].toLowerCase())){
        result = true
        for(let v=1;v<words[x].length;v++){
            if(!(map1.has(words[x][v].toLowerCase()))){
                result = false
                break;
            }
        }
        if(result){
            arr.push(words[x])
        }
       }
if(map2.has(words[x][0].toLowerCase())){
            result = true
        for(let v=1;v<words[x].length;v++){
            if(!(map2.has(words[x][v].toLowerCase()))){
                result = false
                break;
            }
        }
        if(result){
            arr.push(words[x])
        }
       }if(map3.has(words[x][0].toLowerCase())){
                result = true
        for(let v=1;v<words[x].length;v++){
            if(!(map3.has(words[x][v].toLowerCase()))){
                result = false
                break;
            }
        }
        if(result){
            arr.push(words[x])
        }
       }
    }
    return arr
};

console.log(findWords(words));
